@import plugins.Context
@import org.silkframework.rule.{TransformSpec}
@import controllers.core.routes.{Assets => CoreAssets}
@import org.silkframework.rule.vocab.Vocabularies

@(context: Context[TransformSpec], vocabularies: Vocabularies, rule: String)(implicit session: play.api.mvc.Session)

@header = {
  <script type="text/javascript" src="@CoreAssets.at("libs/silk-react-components/main.js")"></script>
}

@content = {
  <div id="react-hierarchicalMapping"></div>

  <script type="text/javascript">

    HierarchicalMapping(
        'react-hierarchicalMapping',
        {
            baseUrl: '@config.baseUrl',
            project: '@context.project.name',
            transformTask: '@context.task.id',
            initialRule: '@rule'
        }
    );

  </script>

}

@main(Some(context))(header)(null)(content)
